// 验证token
const request = require("../utils/request");
function verifyToken (id) {
  return new Promise(async (resolve ,reject) => {
    const result = await request(`select token from user where id=${id}`)
    if (result.length > 0) {
      resolve(result[0])
    } else {
      reject('系统错误，请联系管理员')
    }
  })
}

module.exports = {
  verifyToken
}